-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-49756][SQL] Postgres dialect supports pushdown datetime functions. #48210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
ping @cloud-fan Please help me review this PR. |
| } | ||
| } | ||
|
|
||
| override def compileExpression(expr: Expression): Option[String] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an interesting change. Shall we do this by default? It's better to push down nothing than failing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#48322 will avoid the issue.
| } | ||
| } | ||
|
|
||
| override def testDatetime(tbl: String): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for my curiosity, what does super.testDatatime do? an empty function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Just is an empty function.
|
thanks, merging to master! |
|
@cloud-fan Thank you! |
…ushing down EXTRACT ### What changes were proposed in this pull request? This is a followup of #48210 to fix correctness issues caused by pgsql filter pushdown. These datetime fields were picked wrongly before, see https://neon.tech/postgresql/postgresql-date-functions/postgresql-extract ### Why are the changes needed? bug fix ### Does this PR introduce _any_ user-facing change? Yes, query result is corrected, but this bug is not released yet. ### How was this patch tested? updated test ### Was this patch authored or co-authored using generative AI tooling? no Closes #50101 from cloud-fan/pgsql. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
…ushing down EXTRACT ### What changes were proposed in this pull request? This is a followup of #48210 to fix correctness issues caused by pgsql filter pushdown. These datetime fields were picked wrongly before, see https://neon.tech/postgresql/postgresql-date-functions/postgresql-extract ### Why are the changes needed? bug fix ### Does this PR introduce _any_ user-facing change? Yes, query result is corrected, but this bug is not released yet. ### How was this patch tested? updated test ### Was this patch authored or co-authored using generative AI tooling? no Closes #50101 from cloud-fan/pgsql. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit 208a7ee) Signed-off-by: Wenchen Fan <[email protected]>
…ushing down EXTRACT ### What changes were proposed in this pull request? This is a followup of apache#48210 to fix correctness issues caused by pgsql filter pushdown. These datetime fields were picked wrongly before, see https://neon.tech/postgresql/postgresql-date-functions/postgresql-extract ### Why are the changes needed? bug fix ### Does this PR introduce _any_ user-facing change? Yes, query result is corrected, but this bug is not released yet. ### How was this patch tested? updated test ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#50101 from cloud-fan/pgsql. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit e65434e) Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
This PR propose to make Postgres dialect supports pushdown datetime functions.
Why are the changes needed?
Currently, DS V2 pushdown framework pushed the datetime functions with in a common way. But Postgres doesn't support some datetime functions.
Does this PR introduce any user-facing change?
'No'.
This is a new feature for Postgres dialect.
How was this patch tested?
GA.
Was this patch authored or co-authored using generative AI tooling?
'No'.